package com.ftg.learn.day05;

/**
 * 五以内两个不重复的数
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/7/12 上午9:23
 */
public class While02 {

    public static void main(String[] args) {
        for (int i = 0; i < 30; i++) {
            int num = (int) (Math.random() * 5) + 1;
            int num1 = 0;
            while (true) {
                num1 = (int) (Math.random() * 5) + 1;
                if (num != num1) {
                    break;
                }
            }
            System.out.printf("第一个数%d第二个数%d\n", num, num1);
        }

    }

}
